home *** CD-ROM | disk | FTP | other *** search
/ Compute! Gazette 1989 June / 1989-06.d64 / grafix converter (.txt) < prev    next >
Commodore BASIC  |  2022-09-20  |  5KB  |  139 lines

  1. 10 rem copyright 1989 compute! publications, inc. - all rights reserved
  2. 20 poke52,88:poke56,88:clr
  3. 30 fori=828to863:readj:pokei,j:next
  4. 40 fori=1to4:readhi$(i):next:fori=1to7:readmu$(i):next
  5. 50 poke53280,.:poke53281,.:l=828:ll=835:lh=837:fl=844:c=847
  6. 60 t$(.)="":t$(1)="[158]"
  7. 70 print"[147]":fori=1to3:printspc(5)t$(.)"                  ":next
  8. 80 printspc(5)" grafix converter "
  9. 90 fori=1to3:printspc(5)t$(.)"                  ":next
  10. 100 print"[145][145]"spc(12)t$(1)"                           "
  11. 110 printspc(12)t$(1)"      copyright 1989       "
  12. 120 printspc(12)t$(1)" compute! publications,inc "
  13. 130 printspc(12)t$(1)"    all rights reserved    "
  14. 140 printspc(12)t$(1)"                           "
  15. 150 print""spc(17)"choose"
  16. 160 print"[154]1. hires":print"[153]2. multi":print"[150]3. quit"
  17. 170 gosub1370
  18. 180 ifa$<"1"ora$>"3"then170
  19. 190 a=val(a$):ifa=3thenend
  20. 200 print"[147]";:ifa=2then220
  21. 210 fori=1to4:printi"[157]. "hi$(i):next:goto230
  22. 220 fori=1to7:printi"[157]. "mu$(i):next
  23. 230 print"   from: ";
  24. 240 gosub1370:ifa$<"1"ora$>"7"then240
  25. 250 f=val(a$):iff>4anda=1then240
  26. 260 ifa=2then280
  27. 270 printhi$(f):goto290
  28. 280 printmu$(f)
  29. 290 print"     to: ";
  30. 300 gosub1370:ifa$<"1"ora$>"7"then300
  31. 310 t=val(a$):ift>4anda=1then300
  32. 320 ift=fthen300
  33. 330 ifa=2then350
  34. 340 printhi$(t):goto360
  35. 350 printmu$(t)
  36. 360 p$="":input"[147]name of picture";p$:ifp$="_"then70
  37. 370 ifp$=""then360
  38. 380 e$=p$:x=.
  39. 390 ifa=2then410
  40. 400 onfgosub890,900,910,920:goto420
  41. 410 onfgosub930,970,1040,1050,1060,1070,1080
  42. 420 p$=e$:iflen(p$)>16then360
  43. 430 print:pokell,x:pokelh,y
  44. 440 n$="":input"name of new picture";n$:ifn$="_"then70
  45. 450 ifn$=""thenprint"[145][145][145]";:goto440
  46. 460 e$=n$:ifa=2then480
  47. 470 ontgosub890,900,910,920:goto490
  48. 480 ontgosub940,970,1040,1050,1060,1070,1080
  49. 490 n$=e$:iflen(n$)>16then440
  50. 500 gosub1260
  51. 510 gosub1370:ifa$="_"then70
  52. 520 ifa$<>chr$(13)then510
  53. 530 sysl,p$,8
  54. 540 gosub1290:gosub1280
  55. 550 gosub1370:ifa$="_"then70
  56. 560 ifa$<>chr$(13)then550
  57. 570 print"    working...":bm=24576:n$=n$+",p,w":ln=.:ifa=2then590
  58. 580 onfgosub1090,1100,1110,1120:goto600
  59. 590 onfgosub1130,1140,1150,1160,1170,1180,1190
  60. 600 ifa=2then620
  61. 610 ontgosub640,680,690,700:close2:goto630ady.
  62. 620 ontgosub740,750,770,800,820,840,860:close2
  63. 630 gosub1290:goto70
  64. 640 hn=92:gosub1200:iff=2thenprint"screen...":fori=1to1024:print#2,chr$(1);:next
  65. 650 iff=3thenprint"screen...":fori=1to1024:print#2,chr$(16);:next
  66. 660 iff=4thengosub1230:nl=24:gosub1210
  67. 670 gosub1220:return
  68. 680 hn=32:gosub1200:gosub1220:return
  69. 690 hn=64:gosub1200:gosub1220:nl=64:gosub1210:return
  70. 700 hn=32:gosub1200:gosub1220:iff=1thengosub1230
  71. 710 iff=2thenprint"screen...":fori=.to999:print#2,chr$(1);:next
  72. 720 iff=3thenprint"screen...":fori=.to999:print#2,chr$(16);:next
  73. 730 print#2,chr$(bo);:nl=6:gosub1210:return
  74. 740 hn=96:gosub1200:gosub1220:gosub1230:gosub1240:gosub1250:return
  75. 750 hn=128:gosub1200:gosub1220:gosub1230:gosub1240
  76. 760 print#2,chr$(241);chr$(255);chr$(0);chr$(1);chr$(7);:return
  77. 770 hn=64:gosub1200:gosub1220:nl=192:gosub1210:gosub1230
  78. 780 nl=24:gosub1210:gosub1240:nl=22:gosub1210
  79. 790 print#2,chr$(bo);:gosub1250:return
  80. 800 hn=92:gosub1200:gosub1230:nl=24:gosub1210
  81. 810 gosub1220:gosub1240:nl=16:gosub1210:return
  82. 820 hn=160:gosub1200:gosub1220:nl=64:gosub1210:gosub1250
  83. 830 nl=127:gosub1210:gosub1230:nl=24:gosub1210:gosub1240:gosub1210:return
  84. 840 hn=32:gosub1200:gosub1220:gosub1230:print#2,chr$(bo);:gosub1250
  85. 850 nl=14:gosub1210:gosub1240:return
  86. 860 ln=220:hn=24:gosub1200
  87. 870 print#2,chr$(abs(254-bg));:nl=19:gosub1210
  88. 880 gosub1230:gosub1240:gosub1220:return
  89. 890 e$="dd"+e$:y=92:return:doodle
  90. 900 e$=e$+".pic":y=96:return:paint now!
  91. 910 y=96:return:print shop
  92. 920 e$=e$+"           ":e$=left$(e$,11)+"  pic":y=96:return:art studio, 11 spaces
  93. 930 e$="?pic ? "+e$+"*":goto960:koala read
  94. 940 e$="[129]pic a "+e$+"        "
  95. 950 e$=left$(e$,15)+chr$(160)
  96. 960 y=96:return
  97. 970 q$="":fori=1tolen(e$)
  98. 980 r$=mid$(e$,i,1):r=asc(r$):ifr>64thenr=r+32
  99. 990 q$=q$+chr$(r):next
  100. 1000 ift=2then1020
  101. 1010 e$="[crt?>"+q$+"*":goto1030:read
  102. 1020 e$="[crt0>"+q$+"         ":e$=left$(e$,16)
  103. 1030 y=96:return
  104. 1040 e$="p-"+e$:y=96:return:artist 64
  105. 1050 e$="rp."+e$:y=92:return:rainbow painter
  106. 1060 e$="pi."+e$:y=96:return:blazing paddles
  107. 1070 e$=e$+"           ":e$=left$(e$,12)+"mpic":y=96:return:adv art studio
  108. 1080 e$="pic."+e$:x=220:y=88:return:micro illustrator
  109. 1090 sc=23552:return:doodle
  110. 1100 sc=23552:pokec,1:sysfl:return:paint now!
  111. 1110 sc=23552:pokec,16:sysfl:return:print shop
  112. 1120 bo=peek(33576):sc=32576:return:art studio
  113. 1130 bg=peek(34576):sc=32576:cr=33576:return:koala
  114. 1140 bo=2:bg=1:sc=32576:cr=33576:return:garfield
  115. 1150 bo=peek(34814):bg=peek(34815):sc=32768:cr=33792:return:artist 64
  116. 1160 sc=23552:cr=32576:return:rainbow painter
  117. 1170 bg=peek(32640):sc=32768:cr=33792:return:blazing paddles
  118. 1180 bo=peek(33576):bg=peek(33577):sc=32576:cr=33592:return:adv art studio
  119. 1190 bg=abs(254-peek(22748)):bm=24768:sc=22768:cr=23768:return:micro illustrator
  120. 1200 open2,8,2,n$:print#2,chr$(ln);chr$(hn);:return:open file, set load address
  121. 1210 print"padding...":fori=1tonl:print#2,chr$(0);:next:return:padding
  122. 1220 print"bitmap...":fori=.to7999:print#2,chr$(peek(bm+i));:next:return:bitmap
  123. 1230 print"screen...":fori=.to999:print#2,chr$(peek(sc+i));:next:return:screen
  124. 1240 print"color...":fori=.to999:print#2,chr$(peek(cr+i));:next:return:color
  125. 1250 print"background...":print#2,chr$(bg);:return:background
  126. 1260 print"[147]    insert source disk, hit <return>"
  127. 1270 printspc(12)"hit '_' to abort":return
  128. 1280 print" insert destination disk, hit <return>":goto1270
  129. 1290 open15,8,15:input#15,er,er$,e1,e2:close15:ifer=0thenreturn
  130. 1300 print"[147]disk error: "er;er$;e1;e2:fori=0to2000:nexti:goto70
  131. 1310 open15,8,15:close15:i=st:ret
  132. 1320 data32,253,174,32,212,225,162,,160,,169,,32,213,255,96
  133. 1330 data162,,169,,189,,92,189,,93,189,,94,189,,95,232,208,241,96
  134. 1340 datadoodle,paint now!,print shop,art studio
  135. 1350 datakoala,create with garfield,artist 64,rainbow painter
  136. 1360 datablazing paddles,adv art studio,micro illustrator
  137. 1370 geta$:ifa$=""then1370
  138. 1380 return
  139.